
const icon_dir = 'icon/';
const PREFIX = '/authen/img/';
const MAIN = PREFIX + 'main/'
const mine_dir = PREFIX + 'mine/'
const dialog = PREFIX + 'dialog/';
const login = PREFIX + 'login/';
const debt = PREFIX + 'debt/';
const addCuiji = PREFIX + 'addcuiji/';
const common = PREFIX + 'common/'
const ranking = PREFIX + 'ranking/'
const attend = PREFIX + 'attend/'
const default_imgs = PREFIX + 'default/'
const news = PREFIX + 'news/'

function createImgObj(url, width, height, single) {
    let obj = {
        source: {url},
        property: {width, height}
    };
    if (single) {
        return obj;
    } else {
        obj.source.url = obj.source.url + '.png';
        obj.property.height = obj.property.height/2;
        obj.property.width = obj.property.width/2
    }
    return obj;
}

export const MainTab = {
    Home: MAIN + 'homehui.png',
    HomeFocus: MAIN + 'home.png',
    Me: MAIN + 'mehui.png',
    MeFocus: MAIN + 'me.png',
    Attendance: MAIN + 'dakahui.png',
    AttendanceFocus: MAIN + 'daka.png',
    Ranking: MAIN + 'paihanghui.png',
    RankingFocus: MAIN + 'paihang.png',
}
export const HOME ={
    BANNER: MAIN + 'banner@2x.png',
    TZ: MAIN + 'tz_icon@2x.png',
    BG: MAIN + 'bg@2x.png',
}
export const myNav = {
    CJ: mine_dir + 'cuijiguanli.png',
    DJCK: mine_dir + 'dianjichakan.png',
    GYWM: mine_dir + 'guanyuwomen.png',
    KF: mine_dir + 'kefu.png',
    RB: mine_dir + 'ribaoicon.png',
    SZ: mine_dir + 'shezhi.png',
    WT: mine_dir + 'wenti.png',
    BANNER: mine_dir + 'wodebanner.png',
    BG: mine_dir + 'wodebg.png',
    JJ: mine_dir + 'wodejiangjimicon.png',
    AVATAR: mine_dir + 'xinguanyunlogo.png',
    LOGO: mine_dir + 'wodetouxiang.png',
    NSC: mine_dir + 'newsicon.png',
};
export const RankingImg ={
    1: ranking + '1.png',
    2: ranking + '2.png',
    3: ranking + '3.png',
}
export const AVATAR ={
    male: mine_dir + 'male.png',
    famale: mine_dir + 'famale.png',
}
export const Attend = {
    BUKA:attend+'bukashenqing.png',
    TPSC:attend+'bukatupiantianjia.png',
    DKL:attend+'dakalan.png',
    DKRL:attend+'dakayueli.png',
    DKZ:attend+'dakazi.png',
    FUJIAN:attend+'fujian.png',
    SQJL:attend+'shenqingjilu.png',
    QJSQ:attend+'qinjia.png',
    XRBFJ:attend+'xieribaofujian.png',
    XRBTP:attend+'xieribaotupian.png',
}
export const DefaultImg = {
    LOADING:default_imgs+'jiazaizhong.png',
    WLYC:default_imgs+'wangluoyichang.png',
    WPBC:default_imgs+'weipaibanci.png',
    NORANK:default_imgs+'zanwupaihang.png',
    NOTASK:default_imgs+'zanwurenwu.png',
    NONEWS:default_imgs+'zanwuxiaoxi.png',
}
export const NewsImg = {
    GG:news+'gonggao.png',
    GGH:news+'gonggaohong.png',
    KQXX:news+'kaoqinxiaoxi.png',
    RWTX:news+'renwutixing.png',
    XXTX:news+'xiaoxitixing.png',
}
export const Common = {
    CKQW: common+'chakanquanwei.png',
    DHB: common+'daohangbai.png',
    DHFW: common+'dianhuafuwu.png',
    DZH: common+'dizhihui.png',
    DZL: common+'dizhilv.png',
    DEL: common+'guanbi.png',
    DELgg: common+'guanbigonggao.png',
    JILU: common+'jilu.png',
    MMG: common+'mimaguan.png',
    MMK: common+'mimakai.png',
    QITA: common+'qitaxinxi.png',
    RGZX: common+'rengongzuoxi.png',
    SMFW: common+'shangmenfuwu.png',
    SJG: common+'shangjianhui.png',
    SJH: common+'shoujihui.png',
    XJB: common+'xiajianhei.png',
    XJG: common+'xiajianhui.png',
    ZNYH: common+'zhinengyunhu.png',
    YJT: common+'youjian.png',
}

export const Debt = {
    AJXX: debt+'anjianxinxi.png',
    CKQB: debt+'chakanquanbu.png',
    DH: debt+'phone.png',
    HKFS: debt+'huankuanfangshi.png',
    M: debt+'nan.png',
    W: debt+'nv.png',
    RWXX: debt+'renwuxinxi.png',
    SYTS: debt+'shengyutianshu.png',
    SJ: debt+'shouji.png',
    YJT: debt+'youjian.png',
    ZWRXX: debt+'zhaiwurenxinxi.png',
    ZWXX: debt+'zhaiwuxinxi.png',
}

export const AddCuiji = {
    DH: addCuiji+'dianhua.png',
    DW: addCuiji+'dingwei.png',
    GR: addCuiji+'geren.png',
    JR: addCuiji+'jiaren.png',
    PZ: addCuiji+'paizhao.png',
    QT: addCuiji+'qita.png',
    SM: addCuiji+'shangmen.png',
    TJ: addCuiji+'tianjia.png',
    XZHK: addCuiji+'xinzenghuikuan.png',
    DL: addCuiji+'del.png',
}

// export const LOGIN_IMG = {
//     BY:login + 'biyan.png',
//     DEL:  login + 'guanbidl.png',
//     EYE:  login + 'zhengyan.png',
//     MIMA_S:  login + 'mimabi.png',
//     MIMA_H:  login + 'mimaKAI.png',
//     SJ: login + 'shoujihao.png',
//     LOGO: login + 'denglulogo.png',
// }
export const LOGIN_IMG = {
    BY: createImgObj(login + 'biyan', 30, 30),  
    BY2: createImgObj(login + 'by_icon', 30, 13),  
    DEL:  createImgObj(login + 'guanbidl', 24, 24),  
    EYE:  createImgObj(login + 'zhengyan', 30, 30),  
    EYE2:  createImgObj(login + 'eye_icon', 30, 17),  
    MIMA_H:  createImgObj(login + 'mimabi', 22, 28),  
    MIMA_S:  createImgObj(login + 'mimaKAI', 22, 28),  
    SJ:  createImgObj(login + 'shoujihao', 26, 30),  
    LOGO:  createImgObj(login + 'denglulogo', 200,139),  
}


